<!DOCTYPE html>
<html>
<head>
	<title>{$post_title}|{$site_name} </title>
	<meta name="keywords" content="{$post_keywords}"/>
	<meta name="description" content="{$post_excerpt}">
	<tc_include file="Public:head"/>
	<style>
		#article_content img{height:auto !important}
		#article_content {word-wrap: break-word;}
		.btn {margin-top: 33px;}
	</style>
</head>
<body class="">
<tc_include file="Public:nav"/>
<div class="container " style="background-color:#fff;">
	<div class="row">

		<div class="span9">
			<div class="tc-box first-box article-box">
				<h2>
					<if condition="$term['term_id']==1">
						<img src="__TMPL__Public/assets/images/news.png"/>
						<elseif condition="$term['term_id']==2" /><img src="__TMPL__Public/assets/images/notice.png"/>
						<else/><img src="__TMPL__Public/assets/images/academic.png"/>
					</if> {$post_title}
				</h2>
				<div class="article-infobox">
					<span>{$post_date} by {$user_nicename|default=$user_login}</span>
					<span>
					<a href="javascript:;"><i class="fa fa-eye"></i><span>阅读{$post_hits}</span></a>
					</span>
				</div>
				<hr>
				<div id="article_content">
					{$post_content}
				</div>
				<if condition="empty($post_source)">
                                        <div>
                                        	<b>注：本文为原创，如转载请注明出处。</b>
                                        </div>
                                        <elseif condition="$post_source eq 'translate' "/>
                                        	
                                        <else/>
                                        <div>
                                            <b>注：本文转载自<a href="{$post_source}" target="_blank">{$post_source}</a>,如有侵权行为，请联系管理员及时删除。</b>   
                                        </div>
                                </if>

				<div>
					<if condition="!empty($prev)">
						<a href="{:leuu('article/index',array('id'=>$prev['object_id'],'cid'=>$prev['term_id']))}" class="btn btn-primary pull-left"><i class="fa fa-chevron-circle-left "></i> 上一篇<br/>{$prev['post_title']}</a>
					</if>
					<if condition="!empty($next)">
						<a href="{:leuu('article/index',array('id'=>$next['object_id'],'cid'=>$next['term_id']))}" class="btn btn-warning pull-right">下一篇 <i class="fa fa-chevron-circle-right "></i><br/>{$next['post_title']}</a>
					</if>
					<div class="clearfix">

					</div>
				</div>
				{:hook('comment',array(
				'post_id'=>$article_id,
				'post_table'=>'posts',
				'post_title'=>$post_title
				))}
			</div>
		</div>
		<div class="span3">
			<div class="tc-box">
				<div class="headtitle">
					<h2><img src="__TMPL__Public/assets/images/bar.png"/>分享文章 </h2>
					<span class="sub-header">Share</span>
				</div>
				<div class="bdsharebuttonbox">
					<a href="#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博"></a><a href="#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间"></a>
					<a href="#" class="bds_renren" data-cmd="renren" title="分享到人人网"></a>
					<a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a>
				</div>
				<script>
					window._bd_share_config={
						"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"1","bdSize":"24"},
						"share":{}
					};
					with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];
				</script>
			</div>
			<div class="tc-box">
				<div class="headtitle">
					<h2><img src="__TMPL__Public/assets/images/bar.png"/>最新发布 </h2>
					<span class="sub-header">Latest</span>
				</div>
				<div class="ranking">
					<php>
						$hot_articles=sp_sql_posts("cid:$portal_last_post;field:post_title,post_excerpt,object_id,smeta,term_id;order:post_date desc;limit:5;");
					</php>
					<ul class="unstyled">
						<foreach name="hot_articles" item="vo">
							<php>$top=$key<3?"top3":"";</php>
							<li class="{$top}"><i>{$key+1}</i><a title="{$vo.post_title}" href="{:leuu('article/index',array('id'=>$vo['object_id'],'cid'=>$vo['term_id']))}">{$vo.post_title}</a></li>
						</foreach>
					</ul>
				</div>
			</div>
			<div class="tc-box">
				<div class="headtitle">
					<h2><img src="__TMPL__Public/assets/images/bar.png"/>友情链接 </h2>
					<span class="sub-header">Link</span>
				</div>
				<div class="ranking">
					<php>$links=sp_getlinks();</php>
					<ul class="unstyled">
						<foreach name="links" item="vo">
							<li class="top3">
								<a href="{$vo.link_url}" target="{$vo.link_target}"><i class="fa fa-share-alt"></i>{$vo.link_name}</a>
							</li>
						</foreach>
					</ul>
				</div>
			</div>
		</div>

	</div>
</div>
<tc_include file="Public:footer"/>
<tc_include file="Public:scripts"/>
</body>
</html>
